﻿Public Class Registrar_proveedor
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub BT_atras_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_atras.Click
        Response.Redirect("~/Registrar.aspx")
    End Sub

    Protected Sub BT_registrar_Click(ByVal sender As Object, ByVal e As EventArgs) Handles BT_registrar.Click

        Dim datacontex As New DCStorexpressDataContext
        Dim mensaje As MsgBoxResult

        mensaje = MsgBox("¿Desea Guardar Registro?", MsgBoxStyle.OkCancel, "REGISTRO")
        If mensaje = MsgBoxResult.Ok Then
            MsgBox("Registro Guardado")

            datacontex.INSERTAR_PROVEEDOR(Me.TB_nit.Text, Me.TB_nombre.Text, Me.TB_direccion.Text, Me.TB_e_mail.Text, Me.TB_contacto.Text, Me.TB_numtel.Text)

            TB_nit.Text = ""
            TB_nombre.Text = ""
            TB_direccion.Text = ""
            TB_e_mail.Text = ""
            TB_contacto.Text = ""
            TB_numtel.Text = ""


        End If

    End Sub
End Class